<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>新增图书</title>
		<link rel="stylesheet" type="text/css"
			href="../css/commonBookTest.css">
		<script type="text/javascript"
			src="${CONTEXT_ROOT }/fckeditor/fckeditor.js"></script>
			<script language="javascript" type="text/javascript" src="${CONTEXT_ROOT }/My97DatePicker/WdatePicker.js"></script>
		<style type="text/css">
			body {
				font-family: 华文楷体;
				color: #000000;
				background-color: #556b2f;
			}
			
			a:active {
				color: #ffffff;
				text-decoration: none;
			}
			
			a:visited {
				color: #96CFFC;
				text-decoration: none;
			}
			
			a:hover {
				color: yellow;
				text-decoration: underline;
			}
			
			.ta {
				color: #ffffff;
				background-color: #556b2f;
				position: relative;
				top: 20px;
			}
			
			.ta01 {
				background-color: #ffffff;
				position: relative;
				top: 0px;
			}
			
			.td00 {
				font-family: 华文楷体;
				background-color: #ffffff;
			}
		</style>
	</head>
	<body>
		<center>
			<form action="${CONTEXT_ROOT }/SysBookAddServlet" method="post"
				enctype="multipart/form-data">
				<input id="parentCategoryId" name="parentCategoryId" type="hidden"
					value="${parentCategoryId}"></input>
				<input id="path" name="path" type="hidden" value="${path}"></input>
				<table border="0" class="ta" width="80%">
					<tr height="50">
						<td align="left">
							<c:if test="${not empty path }">
								<a href="${CONTEXT_ROOT }/SysBookServlet?method=list">图书分类</a>- ${path}
							</c:if>
						</td>
						<td align="right">
							<a
								href="${CONTEXT_ROOT}/SysBookServlet?method=list&parentCategoryId=${parentCategoryId}">返回列表</a>
						</td>
					</tr>
				</table>
				<br>
				<table width="80%" border="1" class="ta01">
					<tr>
						<td height="50px" colspan="2">
							新增图书
						</td>
					</tr>

					<tr>
						<td align="right" valign="middle" width="20%">
							书名&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle" width="80%">
							<input type="text" name="bookName" size="80">&nbsp;&nbsp;<font color="red"><strong>*</strong></font>
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							分类&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle" width="50%">
							${bookCategory.categoryName }
							<input type="hidden" name="categoryId"
								value="${bookCategory.categoryId}">
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							上传图片&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle">
							<input type="file" name="bookImg" size="50">
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							作者&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle">
							<input type="text" name="bookAuthor" size="80">&nbsp;&nbsp;<font color="red"><strong>*</strong></font>
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							出版社&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle">
							<select name="publishId" style="width: 350px">
								<c:forEach items="${publishList }" var="publish">
									<option value="${publish.publishId}">
										${publish.publishName}
									</option>
								</c:forEach>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							出版日期&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle">
							<input class="Wdate" type="text" onClick="WdatePicker()" name="publishDate" size="80">
						</td>
					</tr>
					<tr>
						<td align="right" valign="middle">
							价格&nbsp;&nbsp;
						</td>
						<td align="left" valign="middle">
							<input type="text" name="bookPrice" size="10">
							元&nbsp;&nbsp;<font color="red"><strong>*</strong></font>
						</td>
					</tr>
					
					<tr>
						<td align="right" valign="top">
							是否是特价&nbsp;&nbsp;
						</td>
						<td align="left" valign="top">
							<select name="isSpecialPrice" style="width: 80px">
								<option value="0">
									否
								</option>
								<option value="1">
									是
								</option>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right" valign="top">
							是否是新书&nbsp;&nbsp;
						</td>
						<td align="left" valign="top">
							<select name="isNew" style="width: 80px">
								<option value="0">
									否
								</option>
								<option value="1">
									是
								</option>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right" valign="top">
							是否是推荐书&nbsp;&nbsp;
						</td>
						<td align="left" valign="top">
							<select name="isCommend" style="width: 80px">
								<option value="0">
									否
								</option>
								<option value="1">
									是
								</option>
							</select>
						</td>
					</tr>
					<tr>
						<td align="right" valign="top">
							图书简介&nbsp;&nbsp;
						</td>
						<td class="td00" valign="top">
							<script type="text/javascript">
								var oFCKeditor = new FCKeditor("bookInfo");
								oFCKeditor.BasePath = "${CONTEXT_ROOT }/fckeditor/";
								oFCKeditor.Height = 230;
								oFCKeditor.ToolbarSet = 'Basic';
								oFCKeditor.Create();
							</script>
						</td>
					</tr>
					<tr>
						<td>
							<br>
						</td>
						<td align="center">
							<input type="hidden" name="method" value="add">
							<input type="submit" name="button" value="提交">
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="reset" name="button" value="重置">
						</td>
					</tr>
				</table>
			</form>
		</center>
	</body>
</html>